package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.FormalStudent;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;


public interface FormalStudentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(FormalStudent record);

    FormalStudent selectByPrimaryKey(Long id);

    List<FormalStudent> selectAll();

    FormalStudent selectById(Long id);

    int updateByPrimaryKey(FormalStudent record);

    int query4Count(QueryObject qo);

    List<FormalStudent> query4List(QueryObject qo);

    void transfer(@Param("targetClassId") Long targetClassId, @Param("formalStudentId") Long formalStudentId);

    void updateStatus(Long formalStudentId);

    void transferStatus(Long formalStudentId);

    void updateAbandonStatus(Long formalStudentId);

    List<FormalStudent> selectAllPayed();

    void auditDebtClear(@Param("id") Long id, @Param("prepaidTuition") BigDecimal prepaidTuition, @Param("debt") BigDecimal debt);
    void auditDebtNotClear(@Param("id") Long id, @Param("prepaidTuition") BigDecimal prepaidTuition, @Param("debt") BigDecimal debt);
}